package com.biaobiaoqi.scoreanalysis.administrator.action;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.biaobiaoqi.scoreanalysis.hibernate.bean.ClazzType;
import com.biaobiaoqi.scoreanalysis.hibernate.bean.SchoolYear;
import com.biaobiaoqi.scoreanalysis.service.IClazzTypeService;
import com.biaobiaoqi.scoreanalysis.service.ISchoolyearService;
import com.opensymphony.xwork2.ActionSupport;

public class NewExam extends ActionSupport {
 	private static final long serialVersionUID = 2793609279568106858L;
 	private static final Log log = LogFactory.getLog(NewExam.class);
 	private List<ClazzType> clazzTypes;
 	private List<SchoolYear> schoolYears;
 	
 	@Resource
 	private IClazzTypeService clazzTypeService;
 	@Resource
 	private ISchoolyearService schoolyearService;
 	public String execute() {
 		log.debug("new exam");
 		try {
 			clazzTypes = clazzTypeService.listClazzType();
 			schoolYears = schoolyearService.listSchoolYear(0, 6);
		} catch (Exception e) {
			log.error("new exam failed", e);
		}
		return SUCCESS;
	}
	public List<ClazzType> getClazzTypes() {
		return clazzTypes;
	}
	public void setClazzTypes(List<ClazzType> clazzTypes) {
		this.clazzTypes = clazzTypes;
	}
	public List<SchoolYear> getSchoolYears() {
		return schoolYears;
	}
	public void setSchoolYears(List<SchoolYear> schoolYears) {
		this.schoolYears = schoolYears;
	}
 	
}
